package com.ticketbooking.entity;

import javax.persistence.*;

@Entity
@Table(name = "userinf",schema = "ticketbooking")
public class UserInfEntity {
    private String userid;
    private String username;
    private String realname;//用户地址
    private String useradd;
    private String useremail;
    private String userphone;
    private String usercard;

    @Id
    @Column(name = "userid")
    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    @Basic
    @Column(name = "username")
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    @Basic
    @Column(name = "realname")
    public String getRealname() {
        return realname;
    }

    public void setRealname(String realname) {
        this.realname = realname;
    }

    @Basic
    @Column(name = "useradd")
    public String getUseradd() {
        return useradd;
    }

    public void setUseradd(String useradd) {
        this.useradd = useradd;
    }

    @Basic
    @Column(name = "useremail")
    public String getUseremail() {
        return useremail;
    }

    public void setUseremail(String useremail) {
        this.useremail = useremail;
    }

    @Basic
    @Column(name = "userphone")
    public String getUserphone() {
        return userphone;
    }

    public void setUserphone(String userphone) {
        this.userphone = userphone;
    }

    @Basic
    @Column(name = "usercard")
    public String getUsercard() {
        return usercard;
    }

    public void setUsercard(String usercard) {
        this.usercard = usercard;
    }

    @Override
    public boolean equals(Object o){
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        UserInfEntity that = new UserInfEntity();
        return (userid != null ? userid.equals(that.getUserid()) : that.getUserid() == null) &&
                (username != null ? username.equals(that.getUsername()) : that.getUsername() == null)&&
                (realname != null ? realname.equals(that.getRealname()) : that.getRealname() == null)&&
                (useradd != null ? useradd.equals(that.getUseradd()) : that.getUseradd() == null)&&
                (useremail != null ? useremail.equals(that.getUseremail()) : that.getUseremail() == null)&&
                (userphone != null ? userphone.equals(that.getUserphone()) : that.getUserphone() == null)&&
                (usercard != null ? usercard.equals(that.getUsercard()) : that.getUsercard() == null);
    }
}
